<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        /* 1.理解
              *全称：Immediately-Invoked Function Expression(立即调用函数表达式)
           2.作用
              *隐藏实现
              *不会污染全局命名空间
        */
        // 匿名函数自调用
        (function (){
            var a = 1;
            a++;
            console.log(a);
        }) ();
        // 2
    </script>
</head>
<body>
    
</body>
</html>